<template>
	<view class="contxt-box" :style="[AppSkinVar]">
		<e-loading-page :loading="loading"  >
			<template #icon>
				<loader ></loader>
			</template>
		</e-loading-page>
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script setup lang="ts">
	import {ref} from 'vue'
	import { getInviteData } from '@/common/request/api'

	const loading = ref(true)
	const content = ref('')

	getInviteData({
		// #ifdef  PREVIEW
		templateId: uni.getStorageSync('templateId'),
		// #endif
		shareUrl: '',
		// #ifdef  PRIVATE
		fromType: 'mp_private'
				// #endif
				// #ifndef  PRIVATE
				fromType: getApp().globalData.payFromType
		// #endif
	}).then(res => {
		if (res.global) {
			content.value = res.global.backContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
		}
	}).finally(() => {
			loading.value = false
		})
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.contxt-box {
		padding: 30rpx;
	}
</style>